<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
use Hyperf\HttpServer\Router\Router;
use App\Controller\MyObjectController;
use App\Controller\HealthRecordController;

Router::addRoute(['GET', 'POST', 'HEAD'], '/', 'App\Controller\IndexController@index');

Router::get('/favicon.ico', function () {
    return '';
});

Router::get('/fetch_objects', [MyObjectController::class, 'fetchObjects']);
Router::get('/search_objects', [MyObjectController::class, 'searchObjects']);
Router::get('/fetch_upload_key', [MyObjectController::class, 'fetchUploadKey']);
Router::post('/create_object', [MyObjectController::class, 'createObject']);
Router::post('/update_object', [MyObjectController::class, 'updateObject']);
Router::post('/remove_object', [MyObjectController::class, 'removeObject']);
Router::get('/record_health', [HealthRecordController::class, 'create']);
Router::get('/record_health_list', [HealthRecordController::class, 'recordList']);
Router::get('/record_sugar_list', [HealthRecordController::class, 'bloodSugarList']);
Router::get('/remove_health_record', [HealthRecordController::class, 'remove']);